<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="https://unpkg.com/vue@next"></script>
    <div id="app">
        <todo-item>
            <!-- 如果不向slot传入内容，就会读slot默认的内部内容 -->

            <!-- 一旦向slot内部传入内容，则slot内部的默认内容不会渲染到组件上 -->
            我是逗比
        </todo-item>

    </div>
    <script>
        const vueOpt = {
            data(){
                return {

                }
            }
        }

        const app = Vue.createApp(vueOpt);
        app.component('todo-item', {
            data(){
                return {

                }
            },

            template: `
                <button type="submit">
                    <slot>当前按钮</slot>
                </button>
            `
        });

        app.mount('#app');
    </script>
</body>
</html>